﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Net.Mail;

namespace GatorGradNet
{
    public partial class GatorGradNet : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            user.Text = Session["UserName"].ToString();
        }

        protected void btn_Logout(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("Login2.aspx");
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Session.Abandon();
            Response.Redirect("Login2.aspx");
        }
    }
    /*
    public class MailAPI
    {
        string username,email;
        string subject, body;

        public MailAPI(string user, string email)
        {
            this.username = user;
            this.email = email;
        }
        
        public void sendMessageToGatorGradNet(string feedback)
        {
            var fromAddress = new MailAddress(this.email, this.username);
            var toAddress = new MailAddress("gatorgradnet.gmail.com", "Gator Grad Net Team");
            string fromPassword = ProjectSettings.gmailKey;
            var smtp = new SmtpClient
            {
                Host = "smtp.gmail.com",
                Port = 587,
                EnableSsl = true,
                DeliveryMethod = SmtpDeliveryMethod.Network,
                UseDefaultCredentials = false,
                Credentials = new System.Net.NetworkCredential(fromAddress.Address, fromPassword)

            };
            using (var message = new MailMessage(fromAddress, toAddress)
            {
                Subject = subject,
                Body = content
            })
            {
                smtp.Send(message);
            }
        }
    }
     */
}